package com.digitalbuana.smiles.data;

import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

public class AppConfiguration {

	private static AppConfiguration instance;
	private static SharedPreferences appPreference;
	
	public AppConfiguration GetInstance(Context ctx) {
		if (instance == null) {
			instance = new AppConfiguration();
			appPreference =  PreferenceManager.getDefaultSharedPreferences(ctx);
		}
		return instance;
	}
	
	public void setTempJSON(String json){
		SharedPreferences.Editor editor = appPreference.edit();
		editor.putString("APPCONFIG_JSON", json);
        editor.commit();
	}
	public String getTempJSON(){
		return appPreference.getString("APPCONFIG_JSON", "");
	}
	
	
	
}
